1 Setup

source("functions.R")
source("functions_sam.R")
library(cytokit)
library(kableExtra)
library(ggedit)
library(monocle)
library(patchwork)
library(readxl)
library(readr)
library(R.utils)
library(Seurat)
library(tidyverse)
library(viridis)
sample <- c("joint_pons.seurat")
tables_directory <- "tables"
dir.create(tables_directory, showWarnings = FALSE)
monocle_objects_directory <- "monocle_objects"
dir.create(monocle_objects_directory, showWarnings = FALSE)

1.1 Load Seurat objects

input_directory <- "/mnt/KLEINMAN_SCRATCH/projects/sjessa/from_hydra/single_cell/2019-02_revision1/output/atlas-02"
load(file.path(input_directory, "joint_pons.seurat.Rda"))
seurat <- joint_pons

1.2 Convert Seurat object to Monocle object.

No oligodendrocytes were found in the hindbrain at E12 and E15.

# Convert cluster numbers to format used in levels(seurat@ident)
selected_clusters <- c(14, 4, 8, 21)
selected_clusters <- paste0("^", selected_clusters, "-")
selected_clusters <- grep(paste(selected_clusters,collapse="|"), levels(seurat@ident), value=TRUE)

# Colour vector is not available in this object for these cluster IDs, so they must be recovered a saved object. seurat@misc$colours and seurat@misc$colours_orig are identical vectors. Bug will be fixed later, according to Selin.
# First, recover corresponding new cluster ID.
load("/mnt/KLEINMAN_SCRATCH/projects/sjessa/from_hydra/single_cell/2019-02_revision1/output/atlas-02/palettes_joint.Rda")
seurat@misc$colours <- pal_jp
# Cluster columns also need to be renamed.
seurat@meta.data$cluster <- as.character(seurat@meta.data$cluster_joint)

monocle <- seurat_to_monocle(seurat, selected_clusters)
#monocle <- orderCells(monocle, reverse=TRUE)
colours <- monocle@experimentData@other$colours

2 Monocle plots

2.1 Cell trajectories

p <- plot_cell_trajectory(monocle, color_by="cluster", show_branch_points=FALSE) + scale_color_manual(values=colours)
p <- p + theme(legend.title=element_blank())
show(p)

p <- p + facet_wrap(~cluster) + theme(legend.position = "none")
show(p)

plot_cell_trajectory(monocle, color_by="Pseudotime", show_branch_points = TRUE)

plot_cell_trajectory(monocle, color_by="State", show_branch_points=TRUE)

p <- plot_complex_cell_trajectory(monocle, color_by="cluster", show_branch_points=FALSE) + scale_color_manual(values=colours)
p <- p + theme(legend.title=element_blank())
show(p)

2.2 Differentially expressed genes across pseudotime

2.2.1 All genes

diff_test_res_all_genes <- differentialGeneTest(monocle,
      fullModelFormulaStr = "~sm.ns(Pseudotime)", cores=12)
sig_gene_names_all_genes <- row.names(subset(diff_test_res_all_genes, qval < 0.1))
plot_pseudotime_heatmap(monocle[sig_gene_names_all_genes,],
      cores = 12,
      num_clusters=1,
      show_rownames = FALSE)

diff_test_res_all_genes <- diff_test_res_all_genes %>% rownames_to_column("gene")
write.table(diff_test_res_all_genes, file.path(tables_directory, "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21_diff_test_res_all_genes.txt"), sep="\t", quote=FALSE, row.names = FALSE)

2.2.2 Transcription factors

input_directory <- "/mnt/KLEINMAN_SCRATCH/projects/blancha/analyses/njabado/single_cell/annotation/animaltfdb3.0"
input_file <- "Mus_musculus_TF.txt"
transcription_factors <- read_tsv(file.path(input_directory, input_file), col_types = cols())

2.2.2.1 Pseudotime heatmaps of significant transcription factors

2.2.2.1.1 q value < 5*10^-5
significant_genes_q_value_5_10_minus_5 <- filter(diff_test_res_all_genes, qval < 5*10^-5) %>% .$gene 
cat("Number of significant genes: ", length(significant_genes_q_value_5_10_minus_5))
## Number of significant genes:  4390
significant_transcription_factors_q_value_5_10_minus_5 <- as.character(significant_genes_q_value_5_10_minus_5[significant_genes_q_value_5_10_minus_5 %in% transcription_factors$Symbol])
cat("Number of significant transcription factors:", length(significant_transcription_factors_q_value_5_10_minus_5))
## Number of significant transcription factors: 260
plot_genes_heatmap_output_q_value_5_10_minus_5 <- plot_pseudotime_heatmap(monocle[significant_transcription_factors_q_value_5_10_minus_5,], cluster_rows=TRUE, num_clusters=3, return_heatmap=TRUE, show_rownames = TRUE)

plot_genes_heatmap_output_q_value_5_10_minus_5 <- plot_pseudotime_heatmap(monocle[significant_transcription_factors_q_value_5_10_minus_5,], cluster_rows=TRUE, num_clusters=1, return_heatmap=TRUE, show_rownames = TRUE)

# The RMarkdown PDF has issues, hence this custom function to save the PDF file.
save_pheatmap_pdf(plot_genes_heatmap_output_q_value_5_10_minus_5[[2]], file.path("figures", "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21", "diff_test_res_plots_transcription_factors_only_q_value_5_10_minus_5_heatmap_custom.pdf"), width=16, height=36)
## pdf 
##   2
heatmap_matrix_q_value_5_10_minus_5 <- plot_genes_heatmap_output_q_value_5_10_minus_5[[1]]
ph_res_q_value_5_10_minus_5 <- plot_genes_heatmap_output_q_value_5_10_minus_5[[2]]
pheatmap_ordering_q_value_5_10_minus_5 <- rownames(heatmap_matrix_q_value_5_10_minus_5[ph_res_q_value_5_10_minus_5$tree_row[["order"]],])

transcription_factors_table_q_value_5_10_minus_5 <- filter(diff_test_res_all_genes, gene %in% significant_transcription_factors_q_value_5_10_minus_5)
# Put genes from the transcription factor table in the same order
transcription_factors_table_q_value_5_10_minus_5 <- transcription_factors_table_q_value_5_10_minus_5 %>% arrange(match(gene, pheatmap_ordering_q_value_5_10_minus_5))

write.table(transcription_factors_table_q_value_5_10_minus_5, file.path(tables_directory, "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21-significant_transcription_factors_diff_test_analysis_qval_5_10_minus_5.txt"), sep="\t", quote=FALSE, row.names=FALSE)

heatmap_matrix_q_value_5_10_minus_5 <- plot_genes_heatmap_output_q_value_5_10_minus_5[[1]]
heatmap_matrix_q_value_5_10_minus_5 <- as.data.frame(heatmap_matrix_q_value_5_10_minus_5) %>% rownames_to_column("gene")
heatmap_matrix_q_value_5_10_minus_5 <- heatmap_matrix_q_value_5_10_minus_5 %>% arrange(match(gene, pheatmap_ordering_q_value_5_10_minus_5))
heatmap_matrix_q_value_5_10_minus_5 %>% head(20) %>% kable() %>% kable_styling() %>% scroll_box(height="200px", width="600px")
gene 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Zfpm1 -1.2712856 -1.2592238 -1.2468984 -1.2343038 -1.2214343 -1.2082843 -1.1948479 -1.1811192 -1.1670921 -1.1527605 -1.1381181 -1.1231585 -1.1078752 -1.0922616 -1.0763109 -1.0600163 -1.0433707 -1.0263671 -1.0089982 -0.9912567 -0.9731351 -0.9546257 -0.9357207 -0.9164123 -0.8966925 -0.8765531 -0.8559857 -0.8349820 -0.8135333 -0.7916310 -0.7692661 -0.7464296 -0.7231123 -0.6993051 -0.6749983 -0.6501823 -0.6248475 -0.5989839 -0.5725813 -0.5456296 -0.5181184 -0.4900371 -0.4613751 -0.4321215 -0.4022695 -0.3718164 -0.3407603 -0.3090997 -0.2768340 -0.2439630 -0.2104875 -0.1764087 -0.1417289 -0.1064509 -0.0705787 -0.0341168 0.0029292 0.0405526 0.0787459 0.1175005 0.1568067 0.1966539 0.2370301 0.2779222 0.3193159 0.3611957 0.4035467 0.4463674 0.4896640 0.5334429 0.5777112 0.6224765 0.6677468 0.7135307 0.7598376 0.8066771 0.8540596 0.9019962 0.9504985 0.9995789 1.0492504 1.099527 1.150422 1.201952 1.254132 1.306980 1.360512 1.414748 1.469705 1.525406 1.581870 1.639120 1.697179 1.756071 1.815821 1.8764546 1.9380000 2.0004854 2.0639402 2.1283954
Thra -1.1413348 -1.1296662 -1.1179384 -1.1061447 -1.0942781 -1.0823315 -1.0702978 -1.0581695 -1.0459394 -1.0335997 -1.0211429 -1.0085611 -0.9958464 -0.9829907 -0.9699858 -0.9568235 -0.9434952 -0.9299923 -0.9163061 -0.9024277 -0.8883481 -0.8740582 -0.8595485 -0.8448096 -0.8298319 -0.8146055 -0.7991205 -0.7833668 -0.7673340 -0.7510117 -0.7343892 -0.7174557 -0.7002001 -0.6826111 -0.6646775 -0.6463874 -0.6277292 -0.6086908 -0.5892598 -0.5694239 -0.5491704 -0.5284862 -0.5073583 -0.4857728 -0.4637050 -0.4411185 -0.4179759 -0.3942389 -0.3698684 -0.3448244 -0.3190661 -0.2925516 -0.2652383 -0.2370825 -0.2080394 -0.1780634 -0.1471075 -0.1151238 -0.0820633 -0.0478755 -0.0125091 0.0240888 0.0619722 0.1011965 0.1418184 0.1838960 0.2274833 0.2725913 0.3192087 0.3673233 0.4169220 0.4679904 0.5205131 0.5744736 0.6298538 0.6866347 0.7447955 0.8043142 0.8651673 0.9273298 0.9907751 1.055475 1.121400 1.188519 1.256799 1.326205 1.396702 1.468252 1.540817 1.614354 1.688823 1.764181 1.840381 1.917379 1.995127 2.0735751 2.1526746 2.2323739 2.3126211 2.3933629
Zfp579 -0.7810556 -0.7882617 -0.7953880 -0.8024058 -0.8092868 -0.8160039 -0.8225304 -0.8288404 -0.8349087 -0.8407104 -0.8462215 -0.8514181 -0.8562766 -0.8607738 -0.8648867 -0.8685922 -0.8718672 -0.8746884 -0.8770323 -0.8788748 -0.8801914 -0.8809569 -0.8811451 -0.8807290 -0.8796802 -0.8779689 -0.8755640 -0.8724324 -0.8685389 -0.8638462 -0.8583146 -0.8519013 -0.8445604 -0.8362429 -0.8268957 -0.8164615 -0.8048785 -0.7920798 -0.7779927 -0.7625387 -0.7456323 -0.7271808 -0.7070830 -0.6852317 -0.6615676 -0.6360868 -0.6087878 -0.5796703 -0.5487360 -0.5159894 -0.4814388 -0.4450975 -0.4069842 -0.3671247 -0.3255522 -0.2823090 -0.2374465 -0.1910271 -0.1431246 -0.0938250 -0.0432274 0.0085550 0.0613950 0.1151501 0.1696626 0.2247594 0.2802654 0.3361074 0.3922668 0.4487271 0.5054737 0.5624937 0.6197763 0.6773126 0.7350960 0.7931216 0.8513870 0.9098916 0.9686373 1.0276280 1.0868700 1.146372 1.206143 1.266198 1.326552 1.387221 1.448225 1.509587 1.571331 1.633482 1.696071 1.759127 1.822684 1.886777 1.951445 2.0167275 2.0826663 2.1493062 2.2166940 2.2848790
Zfp740 -0.7565998 -0.7659481 -0.7752028 -0.7843304 -0.7932980 -0.8020737 -0.8106264 -0.8189256 -0.8269414 -0.8346448 -0.8420071 -0.8490002 -0.8555964 -0.8617681 -0.8674882 -0.8727297 -0.8774653 -0.8816681 -0.8853107 -0.8883653 -0.8908039 -0.8925979 -0.8937177 -0.8941331 -0.8938127 -0.8927241 -0.8908332 -0.8881045 -0.8845008 -0.8799827 -0.8745086 -0.8680345 -0.8605136 -0.8518960 -0.8421283 -0.8311537 -0.8189111 -0.8053350 -0.7903550 -0.7738951 -0.7558738 -0.7362029 -0.7147871 -0.6915263 -0.6663750 -0.6393484 -0.6104647 -0.5797433 -0.5472049 -0.5128730 -0.4767742 -0.4389391 -0.3994034 -0.3582082 -0.3154011 -0.2710369 -0.2251784 -0.1778970 -0.1292737 -0.0793994 -0.0283762 0.0236828 0.0766523 0.1303949 0.1847600 0.2395843 0.2947046 0.3500587 0.4056378 0.4614351 0.5174451 0.5736640 0.6300896 0.6867212 0.7435601 0.8006089 0.8578722 0.9153564 0.9730693 1.0310210 1.0892231 1.147689 1.206435 1.265477 1.324835 1.384531 1.444586 1.505027 1.565881 1.627176 1.688943 1.751216 1.814031 1.877423 1.941434 2.0061038 2.0714773 2.1376005 2.2045215 2.2722913
Tmf1 -0.6616883 -0.6782612 -0.6947307 -0.7110485 -0.7271672 -0.7430397 -0.7586198 -0.7738616 -0.7887199 -0.8031500 -0.8171077 -0.8305492 -0.8434311 -0.8557102 -0.8673439 -0.8782894 -0.8885045 -0.8979467 -0.9065738 -0.9143435 -0.9212131 -0.9271401 -0.9320813 -0.9359934 -0.9388325 -0.9405539 -0.9411124 -0.9404620 -0.9385556 -0.9353451 -0.9307812 -0.9248133 -0.9173893 -0.9084555 -0.8979563 -0.8858343 -0.8720299 -0.8564813 -0.8391243 -0.8198918 -0.7987141 -0.7755182 -0.7502281 -0.7227671 -0.6931308 -0.6613905 -0.6276212 -0.5918985 -0.5542992 -0.5149015 -0.4737853 -0.4310327 -0.3867283 -0.3409593 -0.2938159 -0.2453916 -0.1957836 -0.1450925 -0.0934230 -0.0408838 0.0124121 0.0663475 0.1208005 0.1756451 0.2307503 0.2859808 0.3412081 0.3963916 0.4515355 0.5066448 0.5617250 0.6167820 0.6718224 0.7268530 0.7818815 0.8369157 0.8919640 0.9470356 1.0021396 1.0572862 1.1124855 1.167749 1.223087 1.278511 1.334035 1.389671 1.445431 1.501330 1.557382 1.613600 1.670001 1.726600 1.783412 1.840453 1.897741 1.9552933 2.0131266 2.0712595 2.1297105 2.1884986
Tcf7l2 -0.7576342 -0.7685488 -0.7793482 -0.7899945 -0.8004512 -0.8106825 -0.8206538 -0.8303315 -0.8396827 -0.8486755 -0.8572786 -0.8654616 -0.8731943 -0.8804472 -0.8871911 -0.8933971 -0.8990362 -0.9040795 -0.9084979 -0.9122619 -0.9153415 -0.9177061 -0.9193241 -0.9201630 -0.9201890 -0.9193666 -0.9176590 -0.9150271 -0.9114300 -0.9068239 -0.9011626 -0.8943969 -0.8864741 -0.8773380 -0.8669282 -0.8551802 -0.8420247 -0.8273872 -0.8111877 -0.7933402 -0.7737525 -0.7523252 -0.7289517 -0.7035205 -0.6759823 -0.6463572 -0.6146704 -0.5809504 -0.5452296 -0.5075459 -0.4679431 -0.4264722 -0.3831919 -0.3381697 -0.2914822 -0.2432159 -0.1934676 -0.1423448 -0.0899661 -0.0364610 0.0180298 0.0733545 0.1293506 0.1858448 0.2426540 0.2995852 0.3564507 0.4131731 0.4697330 0.5261141 0.5823027 0.6382873 0.6940594 0.7496126 0.8049428 0.8600482 0.9149293 0.9695886 1.0240306 1.0782619 1.1322907 1.186127 1.239783 1.293273 1.346610 1.399813 1.452899 1.505887 1.558798 1.611656 1.664481 1.717301 1.770139 1.823023 1.875980 1.9290392 1.9822300 2.0355831 2.0891296 2.1429020
Bbx -0.9798442 -0.9786615 -0.9774545 -0.9761993 -0.9748721 -0.9734489 -0.9719057 -0.9702186 -0.9683632 -0.9663155 -0.9640509 -0.9615450 -0.9587732 -0.9557106 -0.9523320 -0.9486124 -0.9445259 -0.9400469 -0.9351490 -0.9298056 -0.9239899 -0.9176741 -0.9108305 -0.9034303 -0.8954444 -0.8868428 -0.8775951 -0.8676697 -0.8570344 -0.8456558 -0.8334998 -0.8205309 -0.8067127 -0.7920071 -0.7763750 -0.7597757 -0.7421669 -0.7235046 -0.7037430 -0.6828342 -0.6607285 -0.6373738 -0.6127157 -0.5866988 -0.5593054 -0.5305577 -0.5004803 -0.4690984 -0.4364381 -0.4025264 -0.3673916 -0.3310635 -0.2935734 -0.2549544 -0.2152417 -0.1744723 -0.1326857 -0.0899239 -0.0462313 -0.0016553 0.0437540 0.0899434 0.1368566 0.1844340 0.2326127 0.2813262 0.3305104 0.3801469 0.4302402 0.4807951 0.5318168 0.5833105 0.6352815 0.6877352 0.7406774 0.7941140 0.8480508 0.9024941 0.9574503 1.0129257 1.0689272 1.125462 1.182536 1.240158 1.298334 1.357072 1.416381 1.476268 1.536741 1.597808 1.659480 1.721763 1.784668 1.848203 1.912378 1.9772033 2.0426880 2.1088426 2.1756774 2.2432031
Tulp4 -0.9739800 -0.9756105 -0.9772083 -0.9787412 -0.9801774 -0.9814850 -0.9826321 -0.9835870 -0.9843178 -0.9847926 -0.9849796 -0.9848469 -0.9843625 -0.9834941 -0.9822097 -0.9804766 -0.9782621 -0.9755333 -0.9722570 -0.9683993 -0.9639263 -0.9588033 -0.9529954 -0.9464666 -0.9391809 -0.9311009 -0.9221888 -0.9124058 -0.9017122 -0.8900672 -0.8774288 -0.8637538 -0.8489976 -0.8331145 -0.8160568 -0.7977755 -0.7782195 -0.7573362 -0.7350706 -0.7113658 -0.6861626 -0.6593991 -0.6310111 -0.6009341 -0.5691600 -0.5357413 -0.5007339 -0.4641955 -0.4261856 -0.3867657 -0.3459997 -0.3039540 -0.2606978 -0.2163036 -0.1708468 -0.1244064 -0.0770650 -0.0289088 0.0199720 0.0694835 0.1195276 0.1700020 0.2208005 0.2718126 0.3229239 0.3740157 0.4249751 0.4757665 0.5263932 0.5768597 0.6271711 0.6773335 0.7273532 0.7772378 0.8269951 0.8766339 0.9261635 0.9755940 1.0249360 1.0742010 1.1234008 1.172548 1.221656 1.270739 1.319811 1.368887 1.417983 1.467115 1.516300 1.565555 1.614899 1.664349 1.713926 1.763648 1.813536 1.8636103 1.9138929 1.9644052 2.0151697 2.0662093
Lcorl 0.0145057 -0.0450676 -0.1034902 -0.1606718 -0.2165299 -0.2709894 -0.3239823 -0.3754475 -0.4253302 -0.4735819 -0.5201599 -0.5650264 -0.6081490 -0.6494991 -0.6890524 -0.7267879 -0.7626872 -0.7967348 -0.8289165 -0.8592198 -0.8876328 -0.9141441 -0.9387417 -0.9614131 -0.9821441 -1.0009189 -1.0177189 -1.0325227 -1.0453050 -1.0560364 -1.0646824 -1.0712031 -1.0755519 -1.0776756 -1.0775128 -1.0749936 -1.0700384 -1.0625569 -1.0524474 -1.0395950 -1.0238712 -1.0051317 -0.9832156 -0.9579490 -0.9292719 -0.8972501 -0.8619533 -0.8234515 -0.7818178 -0.7371312 -0.6894788 -0.6389584 -0.5856807 -0.5297715 -0.4713741 -0.4106506 -0.3477842 -0.2829802 -0.2164676 -0.1484999 -0.0793557 -0.0093391 0.0612199 0.1319666 0.2025213 0.2724810 0.3414505 0.4092648 0.4758820 0.5412684 0.6053973 0.6682492 0.7298115 0.7900781 0.8490493 0.9067315 0.9631371 1.0182839 1.0721953 1.1248998 1.1764305 1.226825 1.276127 1.324382 1.371641 1.417957 1.463389 1.507999 1.551850 1.595010 1.637549 1.679541 1.721061 1.762187 1.803001 1.8435852 1.8840248 1.9244073 1.9648223 2.0053614
Zfp516 -0.2383464 -0.2803540 -0.3212084 -0.3608676 -0.3992963 -0.4364655 -0.4723517 -0.5069366 -0.5402064 -0.5721515 -0.6027659 -0.6320468 -0.6599939 -0.6866091 -0.7118961 -0.7358599 -0.7585066 -0.7798424 -0.7998741 -0.8186078 -0.8360493 -0.8522033 -0.8670733 -0.8806608 -0.8929655 -0.9039848 -0.9137129 -0.9221412 -0.9292575 -0.9350453 -0.9394839 -0.9425477 -0.9442052 -0.9444192 -0.9431457 -0.9403330 -0.9359213 -0.9298415 -0.9220145 -0.9123496 -0.9007435 -0.8870787 -0.8712221 -0.8530263 -0.8324120 -0.8093782 -0.7839222 -0.7560386 -0.7257204 -0.6929614 -0.6577579 -0.6201110 -0.5800283 -0.5375268 -0.4926346 -0.4453935 -0.3958615 -0.3441153 -0.2902525 -0.2343947 -0.1766893 -0.1173122 -0.0564698 0.0055993 0.0686220 0.1322906 0.1962851 0.2604586 0.3247586 0.3891368 0.4535486 0.5179535 0.5823152 0.6466016 0.7107854 0.7748440 0.8387596 0.9025194 0.9661159 1.0295464 1.0928139 1.155926 1.218897 1.281746 1.344496 1.407177 1.469824 1.532479 1.595187 1.658000 1.720975 1.784175 1.847668 1.911528 1.975835 2.0406741 2.1061368 2.1723202 2.2393276 2.3072684
Dach2 -0.2867327 -0.3362488 -0.3839235 -0.4297318 -0.4736593 -0.5157015 -0.5558619 -0.5941516 -0.6305879 -0.6651935 -0.6979954 -0.7290238 -0.7583118 -0.7858941 -0.8118067 -0.8360857 -0.8587673 -0.8798866 -0.8994775 -0.9175719 -0.9341994 -0.9493866 -0.9631570 -0.9755302 -0.9865214 -0.9961415 -1.0043957 -1.0112839 -1.0167995 -1.0209289 -1.0236513 -1.0249369 -1.0247471 -1.0230329 -1.0197338 -1.0147765 -1.0080734 -0.9995208 -0.9889968 -0.9763587 -0.9614404 -0.9440490 -0.9239608 -0.9009215 -0.8747562 -0.8453882 -0.8127374 -0.7767192 -0.7372485 -0.6942445 -0.6476353 -0.5973637 -0.5433927 -0.4857124 -0.4243463 -0.3593585 -0.2908616 -0.2190235 -0.1440755 -0.0663186 0.0138692 0.0960280 0.1796115 0.2639843 0.3484210 0.4321079 0.5141978 0.5942034 0.6718484 0.7468826 0.8190823 0.8882513 0.9542217 1.0168544 1.0760389 1.1316932 1.1837632 1.2322219 1.2770683 1.3183262 1.3560429 1.390288 1.421150 1.448738 1.473177 1.494609 1.513187 1.529079 1.542461 1.553520 1.562450 1.569452 1.574730 1.578495 1.580959 1.5823369 1.5828447 1.5826999 1.5821200 1.5813227
Mitf -0.8963212 -0.8989518 -0.9015411 -0.9040715 -0.9065258 -0.9088877 -0.9111412 -0.9132710 -0.9152618 -0.9170989 -0.9187679 -0.9202541 -0.9215434 -0.9226212 -0.9234729 -0.9240836 -0.9244378 -0.9245194 -0.9243118 -0.9237973 -0.9229569 -0.9217705 -0.9202163 -0.9182709 -0.9159085 -0.9131012 -0.9098181 -0.9060254 -0.9016854 -0.8967568 -0.8911932 -0.8849433 -0.8779496 -0.8701481 -0.8614667 -0.8518247 -0.8411315 -0.8292846 -0.8161687 -0.8016534 -0.7855909 -0.7678139 -0.7481318 -0.7263310 -0.7022373 -0.6757323 -0.6466964 -0.6150085 -0.5805491 -0.5432031 -0.5028637 -0.4594369 -0.4128462 -0.3630375 -0.3099856 -0.2536999 -0.1942312 -0.1316783 -0.0661949 0.0020037 0.0726347 0.1453418 0.2196914 0.2951687 0.3711767 0.4470367 0.5220302 0.5957084 0.6677843 0.7379917 0.8060859 0.8718461 0.9350766 0.9956076 1.0532964 1.1080270 1.1597109 1.2082859 1.2537159 1.2959901 1.3351218 1.371147 1.404124 1.434129 1.461259 1.485627 1.507362 1.526604 1.543509 1.558241 1.570973 1.581889 1.591175 1.599027 1.605641 1.6112202 1.6159686 1.6200928 1.6238010 1.6273027
Foxn3 -0.5506148 -0.5806278 -0.6104213 -0.6399189 -0.6690452 -0.6977267 -0.7258907 -0.7534663 -0.7803837 -0.8065741 -0.8319701 -0.8565051 -0.8801135 -0.9027305 -0.9242921 -0.9447348 -0.9639956 -0.9820117 -0.9987206 -1.0140599 -1.0279668 -1.0403784 -1.0512313 -1.0604615 -1.0680039 -1.0737926 -1.0777603 -1.0798382 -1.0799558 -1.0780405 -1.0740178 -1.0678103 -1.0593380 -1.0485179 -1.0352636 -1.0194848 -1.0010875 -0.9799729 -0.9560379 -0.9291738 -0.8992666 -0.8661962 -0.8298361 -0.7900593 -0.7468848 -0.7004864 -0.6510473 -0.5987545 -0.5437996 -0.4863798 -0.4266989 -0.3649682 -0.3014072 -0.2362438 -0.1697156 -0.1020699 -0.0335642 0.0355335 0.1049448 0.1743803 0.2435402 0.3121141 0.3797816 0.4462123 0.5110668 0.5739971 0.6346766 0.6930123 0.7490306 0.8027632 0.8542465 0.9035209 0.9506310 0.9956253 1.0385555 1.0794772 1.1184491 1.1555327 1.1907926 1.2242959 1.2561124 1.286314 1.314975 1.342172 1.367981 1.392485 1.415762 1.437898 1.458974 1.479077 1.498294 1.516711 1.534418 1.551503 1.568057 1.5841706 1.5999354 1.6154437 1.6307885 1.6460631
Ebf2 -0.7522794 -0.7534545 -0.7545397 -0.7555390 -0.7564566 -0.7572970 -0.7580649 -0.7587649 -0.7594015 -0.7599790 -0.7605016 -0.7609733 -0.7613977 -0.7617782 -0.7621180 -0.7624199 -0.7626864 -0.7629199 -0.7631221 -0.7632949 -0.7634395 -0.7635569 -0.7636477 -0.7637125 -0.7637510 -0.7637629 -0.7637473 -0.7637028 -0.7636273 -0.7635183 -0.7633721 -0.7631842 -0.7629490 -0.7626590 -0.7623052 -0.7618760 -0.7613567 -0.7607288 -0.7599685 -0.7590456 -0.7579211 -0.7565443 -0.7548492 -0.7527491 -0.7501399 -0.7468984 -0.7428713 -0.7378670 -0.7316482 -0.7239228 -0.7143333 -0.7024465 -0.6877426 -0.6696062 -0.6473184 -0.6200555 -0.5868928 -0.5468209 -0.4987742 -0.4416795 -0.3745240 -0.2964488 -0.2068662 -0.1055982 0.0069700 0.1297349 0.2608337 0.3984130 0.5406185 0.6853564 0.8303594 0.9732654 1.1117002 1.2433611 1.3660960 1.4779729 1.5773392 1.6628653 1.7335736 1.7888512 1.8284476 1.852459 1.861300 1.855669 1.836502 1.804928 1.762219 1.709743 1.648921 1.581181 1.507928 1.430513 1.350206 1.268181 1.185503 1.1031218 1.0218689 0.9424582 0.8654917 0.7914658
Hmgxb3 -1.1506975 -1.1492093 -1.1476889 -1.1461063 -1.1444311 -1.1426326 -1.1406801 -1.1385424 -1.1361882 -1.1335856 -1.1307024 -1.1275056 -1.1239620 -1.1200374 -1.1156967 -1.1109042 -1.1056227 -1.0998140 -1.0934386 -1.0864552 -1.0788210 -1.0704910 -1.0614182 -1.0515531 -1.0408435 -1.0292341 -1.0166665 -1.0030785 -0.9884037 -0.9725716 -0.9555064 -0.9371271 -0.9173465 -0.8960709 -0.8731994 -0.8486229 -0.8222237 -0.7938740 -0.7634356 -0.7307582 -0.6956786 -0.6580190 -0.6175860 -0.5741733 -0.5276835 -0.4781472 -0.4256117 -0.3701387 -0.3118070 -0.2507156 -0.1869868 -0.1207692 -0.0522406 0.0183892 0.0908759 0.1649378 0.2402541 0.3164635 0.3931622 0.4699041 0.5462007 0.6215217 0.6952971 0.7669196 0.8357486 0.9011150 0.9623703 1.0192178 1.0715586 1.1193244 1.1624757 1.2010008 1.2349150 1.2642591 1.2890977 1.3095180 1.3256281 1.3375549 1.3454424 1.3494500 1.3497506 1.346529 1.339978 1.330301 1.317707 1.302408 1.284622 1.264565 1.242458 1.218519 1.192963 1.166005 1.137854 1.108716 1.078792 1.0482775 1.0173617 0.9862282 0.9550542 0.9240108
Zfp488 -0.5745624 -0.6086374 -0.6421171 -0.6749232 -0.7069824 -0.7382266 -0.7685916 -0.7980180 -0.8264500 -0.8538353 -0.8801250 -0.9052729 -0.9292353 -0.9519706 -0.9734387 -0.9936009 -1.0124194 -1.0298567 -1.0458752 -1.0604369 -1.0735027 -1.0850323 -1.0949832 -1.1033104 -1.1099662 -1.1148987 -1.1180523 -1.1193663 -1.1187742 -1.1162034 -1.1115740 -1.1047981 -1.0957786 -1.0844085 -1.0705694 -1.0541304 -1.0349465 -1.0128574 -0.9876853 -0.9592333 -0.9272829 -0.8915921 -0.8518921 -0.8078930 -0.7594707 -0.7066928 -0.6496434 -0.5884198 -0.5231368 -0.4539322 -0.3809715 -0.3044527 -0.2246109 -0.1417233 -0.0561129 0.0318477 0.1217326 0.2130604 0.3052919 0.3978295 0.4900171 0.5811413 0.6704338 0.7570753 0.8402008 0.9189063 0.9923182 1.0600529 1.1220012 1.1780936 1.2282975 1.2726161 1.3110859 1.3437753 1.3707825 1.3922327 1.4082765 1.4190870 1.4248576 1.4257998 1.4221408 1.414121 1.401991 1.386012 1.366451 1.343580 1.317674 1.289009 1.257863 1.224508 1.189218 1.152259 1.113894 1.074379 1.033964 0.9928908 0.9513944 0.9097007 0.8680276 0.8265845
Elf1 -0.6961644 -0.7208353 -0.7449734 -0.7685213 -0.7914264 -0.8136407 -0.8351204 -0.8558259 -0.8757206 -0.8947717 -0.9129487 -0.9302237 -0.9465709 -0.9619659 -0.9763857 -0.9898078 -1.0022103 -1.0135713 -1.0238681 -1.0330774 -1.0411743 -1.0481320 -1.0539215 -1.0585110 -1.0618648 -1.0639438 -1.0647038 -1.0640954 -1.0620631 -1.0585447 -1.0534699 -1.0467597 -1.0383253 -1.0280667 -1.0158711 -1.0016120 -0.9851465 -0.9663141 -0.9449339 -0.9208022 -0.8936895 -0.8633370 -0.8294530 -0.7917148 -0.7499230 -0.7040297 -0.6539983 -0.5998026 -0.5414324 -0.4789000 -0.4122466 -0.3415492 -0.2669276 -0.1885514 -0.1066471 -0.0215048 0.0665158 0.1569797 0.2493720 0.3430946 0.4374646 0.5317137 0.6249908 0.7163657 0.8048359 0.8893357 0.9688128 1.0427266 1.1108351 1.1729502 1.2289355 1.2787053 1.3222220 1.3594945 1.3905755 1.4155581 1.4345734 1.4477865 1.4553935 1.4576177 1.4547066 1.446928 1.434566 1.417921 1.397300 1.373021 1.345406 1.314779 1.281462 1.245779 1.208045 1.168571 1.127661 1.085609 1.042698 0.9992034 0.9553856 0.9114949 0.8677689 0.8244328
Sox10 -1.2928045 -1.2824160 -1.2719922 -1.2615040 -1.2509225 -1.2402188 -1.2293638 -1.2183283 -1.2070830 -1.1955987 -1.1838458 -1.1717949 -1.1594164 -1.1466805 -1.1335575 -1.1200173 -1.1060299 -1.0915651 -1.0765926 -1.0610819 -1.0450023 -1.0283231 -1.0110132 -0.9930415 -0.9743768 -0.9549873 -0.9348413 -0.9139069 -0.8921517 -0.8695434 -0.8460491 -0.8216358 -0.7962701 -0.7699184 -0.7425468 -0.7141209 -0.6846060 -0.6539672 -0.6221690 -0.5891756 -0.5549507 -0.5194577 -0.4826593 -0.4445207 -0.4050669 -0.3643851 -0.3225660 -0.2797010 -0.2358823 -0.1912029 -0.1457565 -0.0996378 -0.0529426 -0.0057673 0.0417906 0.0896324 0.1376589 0.1857696 0.2338630 0.2818369 0.3295878 0.3770116 0.4240030 0.4704562 0.5162641 0.5613191 0.6055229 0.6488580 0.6913474 0.7330146 0.7738835 0.8139783 0.8533237 0.8919444 0.9298658 0.9671133 1.0037127 1.0396900 1.0750716 1.1098841 1.1441543 1.177909 1.211176 1.243983 1.276356 1.308326 1.339918 1.371162 1.402086 1.432719 1.463089 1.493226 1.523159 1.552917 1.582530 1.6120274 1.6414388 1.6707944 1.7001242 1.7294585
Zeb2 -0.7180968 -0.7410789 -0.7637920 -0.7861678 -0.8081402 -0.8296457 -0.8506229 -0.8710128 -0.8907581 -0.9098038 -0.9280965 -0.9455843 -0.9622168 -0.9779447 -0.9927197 -1.0064942 -1.0192211 -1.0308534 -1.0413441 -1.0506457 -1.0587101 -1.0654881 -1.0709290 -1.0749806 -1.0775882 -1.0786947 -1.0782402 -1.0761611 -1.0723899 -1.0668549 -1.0594791 -1.0501804 -1.0388703 -1.0254538 -1.0098284 -0.9918835 -0.9714999 -0.9485487 -0.9228907 -0.8943754 -0.8628403 -0.8281098 -0.7899945 -0.7482966 -0.7029642 -0.6541077 -0.6018543 -0.5463430 -0.4877279 -0.4261797 -0.3618885 -0.2950656 -0.2259447 -0.1547834 -0.0818642 -0.0074949 0.0679911 0.1442351 0.2208534 0.2974382 0.3735591 0.4487640 0.5225817 0.5945233 0.6640846 0.7307491 0.7940291 0.8537544 0.9099226 0.9625474 1.0116557 1.0572871 1.0994927 1.1383342 1.1738831 1.2062196 1.2354319 1.2616158 1.2848734 1.3053128 1.3230474 1.338195 1.350879 1.361224 1.369360 1.375417 1.379532 1.381838 1.382475 1.381580 1.379293 1.375756 1.371108 1.365490 1.359044 1.3519102 1.3442293 1.3361413 1.3277859 1.3193019
Zfp276 -0.9059086 -0.9172381 -0.9284397 -0.9394636 -0.9502611 -0.9607851 -0.9709894 -0.9808291 -0.9902602 -0.9992398 -1.0077254 -1.0156754 -1.0230488 -1.0298045 -1.0359021 -1.0413007 -1.0459594 -1.0498369 -1.0528911 -1.0550792 -1.0563569 -1.0566790 -1.0559982 -1.0542653 -1.0514290 -1.0474349 -1.0422259 -1.0357414 -1.0279167 -1.0186829 -1.0079663 -0.9956877 -0.9817616 -0.9660963 -0.9485922 -0.9291417 -0.9076282 -0.8839248 -0.8578936 -0.8293845 -0.7982337 -0.7642625 -0.7272754 -0.6870646 -0.6435442 -0.5967682 -0.5468040 -0.4937295 -0.4376359 -0.3786301 -0.3168382 -0.2524079 -0.1855115 -0.1163484 -0.0451477 0.0278295 0.1022882 0.1778973 0.2542890 0.3310572 0.4077577 0.4839079 0.5589884 0.6324443 0.7036876 0.7721008 0.8370833 0.8983692 0.9558771 1.0095489 1.0593471 1.1052551 1.1472762 1.1854326 1.2197645 1.2503292 1.2771999 1.3004649 1.3202257 1.3365966 1.3497030 1.359681 1.366674 1.370834 1.372322 1.371300 1.367939 1.362409 1.354888 1.345551 1.334577 1.322143 1.308429 1.293611 1.277865 1.2613647 1.2442824 1.2267874 1.2090464 1.1912235
write.table(heatmap_matrix_q_value_5_10_minus_5, file = file.path(tables_directory, "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21-significant_transcription_factors_diff_test_analysis_qval_5_10_minus_5_heatmap_matrix.txt"), sep="\t", quote=FALSE, row.names=FALSE)
2.2.2.1.2 Ordered pseudotime heatmap (Sam’s function)
ordered_matrix <- ordered_pseudotime_heatmap(monocle[significant_transcription_factors_q_value_5_10_minus_5,], show_rownames=FALSE, return_matrix = FALSE)

ordered_matrix <- ordered_pseudotime_heatmap(monocle[significant_transcription_factors_q_value_5_10_minus_5,], show_rownames=FALSE, return_matrix = FALSE)

ordered_matrix <- ordered_pseudotime_heatmap(monocle[significant_transcription_factors_q_value_5_10_minus_5,], show_rownames=TRUE, return_matrix = TRUE)

ordered_matrix <- as.data.frame(ordered_matrix) %>% rownames_to_column("gene")
ordered_matrix <- left_join(select(transcription_factors_table_q_value_5_10_minus_5, gene, pval, qval, num_cells_expressed), ordered_matrix)
write.table(ordered_matrix, file = file.path(tables_directory, "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21_differential_gene_test_analysis_qval_5_10_minus_5_sam_ordered_heatmap_matrix.txt"), sep="\t", quote=FALSE, row.names=FALSE)
2.2.2.1.3 q value < 0.01
significant_genes_q_value_0.01 <- filter(diff_test_res_all_genes, qval < 0.01) %>% .$gene 
cat("Number of significant genes: ", length(significant_genes_q_value_0.01))
## Number of significant genes:  6428
significant_transcription_factors_q_value_0.01 <- as.character(significant_genes_q_value_0.01[significant_genes_q_value_0.01 %in% transcription_factors$Symbol])
cat("Number of significant transcription factors:", length(significant_transcription_factors_q_value_0.01))
## Number of significant transcription factors: 428
plot_genes_heatmap_output_q_value_0.01 <- plot_pseudotime_heatmap(monocle[significant_transcription_factors_q_value_0.01,], cluster_rows=TRUE, num_clusters=1, return_heatmap=TRUE, show_rownames = TRUE)

save_pheatmap_pdf(plot_genes_heatmap_output_q_value_0.01[[2]], file.path("figures", "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21", "diff_test_plots_transcription_factors_only_q_value_0.01_heatmap_custom.pdf"), width=16, height=40)
## pdf 
##   2
heatmap_matrix_q_value_0.01 <- plot_genes_heatmap_output_q_value_0.01[[1]]
ph_res_q_value_0.01 <- plot_genes_heatmap_output_q_value_0.01[[2]]
pheatmap_ordering_q_value_0.01 <- rownames(heatmap_matrix_q_value_0.01[ph_res_q_value_0.01$tree_row[["order"]],])

transcription_factors_table_q_value_0.01 <- filter(diff_test_res_all_genes, gene %in% significant_transcription_factors_q_value_0.01)
# Put genes from the transcription factor table in the same order
transcription_factors_table_q_value_0.01 <- transcription_factors_table_q_value_0.01 %>% arrange(match(gene, pheatmap_ordering_q_value_0.01))

write.table(transcription_factors_table_q_value_0.01, file.path(tables_directory, "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21-significant_transcription_factors_diff_test_analysis_qval_0.01.txt"), sep="\t", quote=FALSE, row.names=FALSE)

heatmap_matrix_q_value_0.01 <- plot_genes_heatmap_output_q_value_0.01[[1]]
heatmap_matrix_q_value_0.01 <- as.data.frame(heatmap_matrix_q_value_0.01) %>% rownames_to_column("gene")
heatmap_matrix_q_value_0.01 <- heatmap_matrix_q_value_0.01 %>% arrange(match(gene, pheatmap_ordering_q_value_0.01))
heatmap_matrix_q_value_0.01 %>% head(20) %>% kable() %>% kable_styling() %>% scroll_box(height="200px", width="600px")
gene 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Zkscan1 -2.3515088 -2.2867933 -2.2213874 -2.1553217 -2.0886285 -2.0213417 -1.9534967 -1.8851308 -1.8162828 -1.7469932 -1.6773043 -1.6072600 -1.5369059 -1.4662894 -1.3954596 -1.3244672 -1.2533647 -1.1822062 -1.1110476 -1.0399464 -0.9689616 -0.8981540 -0.8275857 -0.7573205 -0.6874238 -0.6179622 -0.5490038 -0.4806181 -0.4128757 -0.3458487 -0.2796101 -0.2142342 -0.1497961 -0.0863721 -0.0240392 0.0371249 0.0970416 0.1556318 0.2128160 0.2685141 0.3226458 0.3751307 0.4258881 0.4748383 0.5219180 0.5670820 0.6102866 0.6514890 0.6906476 0.7277220 0.7626730 0.7954622 0.8260531 0.8544099 0.8804984 0.9042860 0.9257411 0.9448340 0.9615361 0.9758207 0.9876625 0.9970380 1.0039252 1.0083040 1.0101559 1.0094643 1.0062213 1.0004773 0.9923120 0.9818066 0.9690438 0.9541073 0.9370819 0.9180530 0.8971068 0.8743300 0.8498096 0.8236329 0.7958872 0.7666599 0.7360382 0.7041089 0.6709587 0.6366736 0.6013392 0.5650403 0.5278612 0.4898850 0.4511944 0.4118708 0.3719947 0.3316457 0.2909020 0.2498409 0.2085385 0.1670696 0.1255078 0.0839255 0.0423939 0.0009829
Tcf25 -2.0686885 -2.0166078 -1.9643685 -1.9119697 -1.8594107 -1.8066909 -1.7538093 -1.7007653 -1.6475582 -1.5941871 -1.5406512 -1.4869498 -1.4330822 -1.3790474 -1.3248448 -1.2704735 -1.2159327 -1.1612216 -1.1063394 -1.0512853 -0.9960584 -0.9406580 -0.8850831 -0.8293329 -0.7734066 -0.7173034 -0.6610223 -0.6045626 -0.5479233 -0.4911035 -0.4341025 -0.3769192 -0.3195529 -0.2620025 -0.2042673 -0.1463463 -0.0882386 -0.0299433 0.0285406 0.0872139 0.1460777 0.2051327 0.2643801 0.3238164 0.3833340 0.4427179 0.5017458 0.5601929 0.6178324 0.6744349 0.7297693 0.7836021 0.8356982 0.8858208 0.9337316 0.9791912 1.0219589 1.0617935 1.0984533 1.1316965 1.1612814 1.1869669 1.2085129 1.2256805 1.2382327 1.2459345 1.2485826 1.2462116 1.2389742 1.2270272 1.2105296 1.1896430 1.1645310 1.1353589 1.1022934 1.0655026 1.0251553 0.9814213 0.9344707 0.8844736 0.8316007 0.7760219 0.7179071 0.6574256 0.5947459 0.5300354 0.4634607 0.3951872 0.3253788 0.2541979 0.1818056 0.1083609 0.0340213 -0.0410575 -0.1167220 -0.1928205 -0.2692035 -0.3457234 -0.4222350 -0.4985949
Mxd4 -2.4702821 -2.4059614 -2.3401159 -2.2727727 -2.2039639 -2.1337271 -2.0621056 -1.9891483 -1.9149102 -1.8394525 -1.7628427 -1.6851547 -1.6064690 -1.5268730 -1.4464607 -1.3653327 -1.2835966 -1.2013669 -1.1187645 -1.0359171 -0.9529591 -0.8700310 -0.7872795 -0.7048575 -0.6229234 -0.5416410 -0.4611795 -0.3817125 -0.3034183 -0.2264788 -0.1510797 -0.0774097 -0.0056598 0.0639768 0.1313054 0.1961307 0.2582568 0.3174886 0.3736317 0.4264934 0.4758835 0.5216148 0.5635039 0.6013779 0.6352150 0.6651509 0.6913389 0.7139418 0.7331311 0.7490859 0.7619920 0.7720408 0.7794286 0.7843559 0.7870263 0.7876463 0.7864242 0.7835696 0.7792932 0.7738061 0.7673194 0.7600440 0.7521902 0.7439675 0.7355846 0.7272492 0.7191519 0.7113486 0.7038304 0.6965876 0.6896109 0.6828908 0.6764180 0.6701832 0.6641772 0.6583909 0.6528151 0.6474408 0.6422589 0.6372605 0.6324367 0.6277785 0.6232770 0.6189234 0.6147090 0.6106250 0.6066626 0.6028131 0.5990677 0.5954180 0.5918551 0.5883705 0.5849556 0.5816017 0.5783004 0.5750431 0.5718212 0.5686262 0.5654497 0.5622831
Sox4 -2.3108759 -2.2496594 -2.1877902 -2.1253049 -2.0622417 -1.9986405 -1.9345429 -1.8699918 -1.8050321 -1.7397101 -1.6740734 -1.6081714 -1.5420548 -1.4757756 -1.4093872 -1.3429444 -1.2765031 -1.2101204 -1.1438546 -1.0777649 -1.0119118 -0.9463565 -0.8811612 -0.8163888 -0.7521030 -0.6883683 -0.6252497 -0.5628129 -0.5011240 -0.4402495 -0.3802564 -0.3212119 -0.2631836 -0.2062391 -0.1504462 -0.0958728 -0.0425869 0.0093439 0.0598517 0.1088691 0.1563286 0.2021632 0.2463064 0.2886934 0.3293009 0.3681482 0.4052581 0.4406545 0.4743631 0.5064104 0.5368245 0.5656343 0.5928700 0.6185627 0.6427444 0.6654479 0.6867071 0.7065564 0.7250309 0.7421667 0.7580001 0.7725683 0.7859088 0.7980597 0.8090597 0.8189475 0.8277619 0.8355356 0.8422987 0.8480814 0.8529145 0.8568286 0.8598549 0.8620244 0.8633686 0.8639191 0.8637074 0.8627654 0.8611249 0.8588180 0.8558766 0.8523330 0.8482191 0.8435674 0.8384098 0.8327788 0.8267064 0.8202249 0.8133665 0.8061634 0.7986477 0.7908515 0.7828068 0.7745456 0.7660999 0.7575015 0.7487822 0.7399737 0.7311077 0.7222157
Mycl -0.8139043 -0.8356217 -0.8570808 -0.8781969 -0.8988877 -0.9190737 -0.9386780 -0.9576256 -0.9758441 -0.9932627 -1.0098125 -1.0254258 -1.0400364 -1.0535788 -1.0659880 -1.0771995 -1.0871484 -1.0957695 -1.1029965 -1.1087619 -1.1129964 -1.1156284 -1.1165834 -1.1157837 -1.1131477 -1.1085892 -1.1020169 -1.0933336 -1.0824355 -1.0692114 -1.0535420 -1.0352986 -1.0143426 -0.9905241 -0.9636813 -0.9336384 -0.9002053 -0.8631758 -0.8223259 -0.7774128 -0.7281729 -0.6743200 -0.6155438 -0.5515192 -0.4821733 -0.4077212 -0.3284172 -0.2445489 -0.1564421 -0.0644661 0.0309624 0.1293757 0.2302525 0.3330160 0.4370333 0.5416155 0.6460186 0.7494465 0.8510536 0.9499494 1.0452041 1.1358542 1.2209101 1.2993640 1.3701986 1.4323966 1.4850304 1.5278494 1.5609704 1.5845620 1.5988387 1.6040561 1.6005069 1.5885170 1.5684413 1.5406606 1.5055775 1.4636133 1.4152045 1.3607999 1.3008575 1.2358413 1.1662188 1.0924581 1.0150253 0.9343821 0.8509834 0.7652750 0.6776917 0.5886550 0.4985718 0.4078323 0.3168090 0.2258555 0.1353050 0.0454702 -0.0433578 -0.1309095 -0.2169374 -0.3012157
Zfp809 -1.3034221 -1.2958219 -1.2881296 -1.2803221 -1.2723759 -1.2642664 -1.2559680 -1.2474542 -1.2386977 -1.2296698 -1.2203409 -1.2106801 -1.2006551 -1.1902322 -1.1793763 -1.1680504 -1.1562159 -1.1438322 -1.1308565 -1.1172436 -1.1029460 -1.0879132 -1.0720919 -1.0554255 -1.0378535 -1.0193120 -0.9997324 -0.9790415 -0.9571613 -0.9340078 -0.9094910 -0.8835142 -0.8559734 -0.8267563 -0.7957420 -0.7627996 -0.7277877 -0.6905529 -0.6509291 -0.6087355 -0.5637761 -0.5158371 -0.4646857 -0.4100742 -0.3518881 -0.2901735 -0.2250053 -0.1564849 -0.0847443 -0.0099508 0.0676884 0.1479223 0.2304514 0.3149246 0.4009352 0.4880187 0.5756506 0.6632457 0.7501580 0.8356825 0.9190582 0.9994720 1.0760662 1.1479455 1.2141879 1.2738564 1.3260735 1.3704829 1.4070306 1.4357279 1.4566478 1.4699204 1.4757293 1.4743068 1.4659285 1.4509085 1.4295937 1.4023585 1.3695993 1.3317295 1.2891742 1.2423656 1.1917382 1.1377253 1.0807546 1.0212450 0.9596041 0.8962250 0.8314846 0.7657416 0.6993355 0.6325851 0.5657882 0.4992210 0.4331382 0.3677731 0.3033378 0.2400242 0.1780042 0.1174311
Hif1a -0.3962246 -0.4416984 -0.4867114 -0.5311344 -0.5748421 -0.6177130 -0.6596289 -0.7004752 -0.7401405 -0.7785164 -0.8154974 -0.8509803 -0.8848643 -0.9170506 -0.9474418 -0.9759420 -1.0024560 -1.0268890 -1.0491466 -1.0691335 -1.0867540 -1.1019108 -1.1145047 -1.1244341 -1.1315946 -1.1358778 -1.1371715 -1.1353584 -1.1303155 -1.1219136 -1.1100165 -1.0944800 -1.0751511 -1.0518673 -1.0244552 -0.9927300 -0.9564943 -0.9155368 -0.8696312 -0.8185352 -0.7619888 -0.6997133 -0.6314097 -0.5567727 -0.4758483 -0.3890663 -0.2968956 -0.1998325 -0.0984055 0.0068214 0.1152451 0.2262212 0.3390618 0.4530350 0.5673641 0.6812284 0.7937644 0.9040680 1.0111974 1.1141771 1.2120022 1.3036439 1.3880557 1.4641802 1.5309570 1.5873308 1.6323521 1.6658479 1.6880540 1.6992512 1.6997592 1.6899327 1.6701572 1.6408462 1.6024371 1.5553878 1.5001742 1.4372860 1.3672246 1.2904995 1.2076262 1.1191228 1.0255078 0.9272976 0.8250042 0.7191327 0.6101798 0.4986311 0.3849599 0.2696254 0.1530710 0.0357232 -0.0820095 -0.1997379 -0.3170925 -0.4337244 -0.5493056 -0.6635294 -0.7761102 -0.8867837
Hmg20b -0.1945130 -0.2543854 -0.3136301 -0.3721075 -0.4296825 -0.4862246 -0.5416075 -0.5957090 -0.6484108 -0.6995982 -0.7491600 -0.7969880 -0.8429768 -0.8870234 -0.9290272 -0.9688890 -1.0065113 -1.0417975 -1.0746514 -1.1049772 -1.1326787 -1.1576589 -1.1798194 -1.1990603 -1.2152791 -1.2283706 -1.2382259 -1.2447321 -1.2477717 -1.2472215 -1.2429524 -1.2348281 -1.2227049 -1.2064301 -1.1858419 -1.1607679 -1.1310242 -1.0964144 -1.0567282 -1.0117406 -0.9612101 -0.9048773 -0.8424637 -0.7736845 -0.6985871 -0.6175776 -0.5310916 -0.4395830 -0.3435273 -0.2434260 -0.1398097 -0.0332408 0.0756840 0.1863317 0.2980314 0.4100739 0.5217112 0.6321570 0.7405878 0.8461449 0.9479367 1.0450428 1.1365173 1.2213947 1.2986956 1.3674330 1.4267031 1.4762919 1.5163489 1.5470597 1.5686421 1.5813426 1.5854345 1.5812147 1.5690013 1.5491311 1.5219568 1.4878448 1.4471725 1.4003263 1.3476992 1.2896886 1.2266947 1.1591181 1.0873583 1.0118121 0.9328719 0.8509246 0.7663500 0.6795201 0.5907975 0.5005351 0.4090752 0.3167489 0.2238752 0.1307614 0.0377022 -0.0550202 -0.1471362 -0.2383887
Atf6b -0.2376819 -0.2951443 -0.3520373 -0.4082242 -0.4635723 -0.5179530 -0.5712416 -0.6233173 -0.6740626 -0.7233634 -0.7711090 -0.8171912 -0.8615045 -0.9039458 -0.9444138 -0.9828091 -1.0190334 -1.0529895 -1.0845805 -1.1137099 -1.1402807 -1.1641955 -1.1853554 -1.2036600 -1.2190067 -1.2312901 -1.2404017 -1.2462289 -1.2486551 -1.2475581 -1.2428103 -1.2342774 -1.2218181 -1.2052828 -1.1845135 -1.1593420 -1.1295897 -1.0950664 -1.0555690 -1.0108809 -0.9607701 -0.9049887 -0.8432710 -0.7753467 -0.7012697 -0.6214432 -0.5362991 -0.4462861 -0.3518735 -0.2535547 -0.1518499 -0.0473088 0.0594877 0.1679256 0.2773566 0.3870977 0.4964312 0.6046050 0.7108342 0.8143021 0.9141633 1.0095467 1.0995588 1.1832886 1.2598123 1.3281996 1.3875982 1.4378123 1.4789889 1.5113074 1.5349745 1.5502220 1.5573049 1.5564985 1.5480968 1.5324098 1.5097617 1.4804887 1.4449368 1.4034603 1.3564198 1.3041801 1.2471089 1.1855752 1.1199475 1.0505929 0.9778752 0.9021542 0.8237844 0.7431139 0.6604838 0.5762273 0.4906686 0.4041230 0.3168959 0.2292827 0.1415683 0.0540270 -0.0330777 -0.1194930
Xpa -1.7642787 -1.7247771 -1.6848583 -1.6445148 -1.6037387 -1.5625222 -1.5208571 -1.4787351 -1.4361478 -1.3930864 -1.3495421 -1.3055058 -1.2609680 -1.2159194 -1.1703502 -1.1242505 -1.0776099 -1.0304183 -0.9826648 -0.9343387 -0.8854288 -0.8359237 -0.7858118 -0.7350813 -0.6837200 -0.6317154 -0.5790550 -0.5257256 -0.4717142 -0.4170072 -0.3615907 -0.3054506 -0.2485725 -0.1909416 -0.1325429 -0.0733609 -0.0133800 0.0474159 0.1090432 0.1715186 0.2348593 0.2990828 0.3642069 0.4302435 0.4970532 0.5643342 0.6317648 0.6990103 0.7657228 0.8315415 0.8960935 0.9589942 1.0198479 1.0782494 1.1337848 1.1860328 1.2345672 1.2789576 1.3187726 1.3535811 1.3829555 1.4064740 1.4237235 1.4343029 1.4378258 1.4339241 1.4222961 1.4030296 1.3764124 1.3427524 1.3023736 1.2556138 1.2028220 1.1443564 1.0805820 1.0118685 0.9385882 0.8611139 0.7798174 0.6950674 0.6072283 0.5166583 0.4237082 0.3287202 0.2320268 0.1339497 0.0347992 -0.0651270 -0.1655437 -0.2661795 -0.3667764 -0.4670906 -0.5668925 -0.6659665 -0.7641115 -0.8611402 -0.9568791 -1.0511685 -1.1438616 -1.2348247
Xbp1 -1.6987856 -1.6575967 -1.6160776 -1.5742199 -1.5320153 -1.4894551 -1.4465305 -1.4032324 -1.3595517 -1.3154787 -1.2710039 -1.2261174 -1.1808090 -1.1350685 -1.0888851 -1.0422482 -0.9951467 -0.9475694 -0.8995046 -0.8509408 -0.8018658 -0.7522674 -0.7021331 -0.6514501 -0.6002054 -0.5483856 -0.4959771 -0.4429661 -0.3893385 -0.3350797 -0.2801750 -0.2246094 -0.1683676 -0.1114338 -0.0537921 0.0045737 0.0636804 0.1235448 0.1841843 0.2456164 0.3078592 0.3709310 0.4348505 0.4996299 0.5651170 0.6309852 0.6968898 0.7624755 0.8273761 0.8912156 0.9536078 1.0141577 1.0724615 1.1281082 1.1806803 1.2297553 1.2749068 1.3157066 1.3517257 1.3825370 1.4077168 1.4268473 1.4395187 1.4453320 1.4439014 1.4348573 1.4178950 1.3931090 1.3607960 1.3212696 1.2748564 1.2218942 1.1627302 1.0977189 1.0272208 0.9516001 0.8712233 0.7864577 0.6976696 0.6052232 0.5094790 0.4107927 0.3095138 0.2059848 0.1005398 -0.0064959 -0.1148071 -0.2240891 -0.3340486 -0.4444039 -0.5548858 -0.6652373 -0.7752147 -0.8845870 -0.9931365 -1.1006586 -1.2069618 -1.3118675 -1.4152101 -1.5168362
Nkx2-2 -0.0138960 -0.0719516 -0.1290422 -0.1850259 -0.2397697 -0.2931491 -0.3450476 -0.3953569 -0.4439760 -0.4908108 -0.5357738 -0.5787834 -0.6197628 -0.6586404 -0.6953478 -0.7298202 -0.7619948 -0.7918103 -0.8192061 -0.8441214 -0.8664939 -0.8862594 -0.9033505 -0.9176957 -0.9292179 -0.9378340 -0.9434531 -0.9459754 -0.9452910 -0.9412786 -0.9338037 -0.9227173 -0.9078538 -0.8890300 -0.8660424 -0.8386654 -0.8066495 -0.7697182 -0.7275665 -0.6798574 -0.6262199 -0.5662457 -0.4994865 -0.4254684 -0.3440988 -0.2557248 -0.1607588 -0.0596711 0.0470004 0.1586416 0.2745562 0.3939607 0.5159821 0.6396572 0.7639348 0.8876788 1.0096744 1.1286355 1.2432141 1.3520111 1.4535881 1.5464812 1.6292145 1.7003161 1.7583342 1.8018538 1.8296376 1.8415190 1.8379103 1.8193148 1.7863146 1.7395623 1.6797741 1.6077224 1.5242290 1.4301588 1.3264133 1.2139237 1.0936449 0.9665481 0.8336139 0.6958249 0.5541582 0.4095775 0.2630253 0.1154148 -0.0323774 -0.1795193 -0.3252300 -0.4687863 -0.6095277 -0.7468612 -0.8802645 -1.0092875 -1.1335539 -1.2527598 -1.3666724 -1.4751270 -1.5780226 -1.6753178
Son -0.2791494 -0.3271638 -0.3749621 -0.4223987 -0.4693291 -0.5156097 -0.5610975 -0.6056504 -0.6491271 -0.6913869 -0.7322900 -0.7716969 -0.8094689 -0.8454678 -0.8795555 -0.9115946 -0.9414478 -0.9689779 -0.9940478 -1.0165202 -1.0362578 -1.0531228 -1.0669770 -1.0776817 -1.0850973 -1.0890834 -1.0894986 -1.0862001 -1.0790439 -1.0678843 -1.0525739 -1.0329633 -1.0089011 -0.9802334 -0.9468040 -0.9084536 -0.8650204 -0.8163391 -0.7622412 -0.7025546 -0.6371035 -0.5657079 -0.4881838 -0.4043606 -0.3144901 -0.2192615 -0.1193895 -0.0155967 0.0913862 0.2008196 0.3119543 0.4240314 0.5362824 0.6479289 0.7581832 0.8662484 0.9713192 1.0725824 1.1692180 1.2604000 1.3452976 1.4230765 1.4929001 1.5539315 1.6053346 1.6462763 1.6760144 1.6945180 1.7021106 1.6991270 1.6859108 1.6628128 1.6301907 1.5884081 1.5378336 1.4788405 1.4118057 1.3371093 1.2551338 1.1662637 1.0708847 0.9693832 0.8621460 0.7495593 0.6320086 0.5098782 0.3835503 0.2534050 0.1198197 -0.0168312 -0.1561771 -0.2978511 -0.4414906 -0.5867377 -0.7332392 -0.8806474 -1.0286199 -1.1768200 -1.3249170 -1.4725862
Sox8 -0.5141742 -0.5439075 -0.5733761 -0.6024667 -0.6310684 -0.6590726 -0.6863728 -0.7128645 -0.7384452 -0.7630142 -0.7864723 -0.8087217 -0.8296657 -0.8492088 -0.8672559 -0.8837125 -0.8984839 -0.9114755 -0.9225918 -0.9317365 -0.9388119 -0.9437185 -0.9463546 -0.9466156 -0.9443941 -0.9395788 -0.9320540 -0.9216996 -0.9083899 -0.8919931 -0.8723712 -0.8493785 -0.8228615 -0.7926582 -0.7585969 -0.7204958 -0.6781623 -0.6313921 -0.5799680 -0.5236597 -0.4622226 -0.3953972 -0.3229079 -0.2444787 -0.1602059 -0.0705917 0.0238155 0.1224337 0.2246448 0.3297914 0.4371754 0.5460574 0.6556559 0.7651492 0.8736760 0.9803381 1.0842038 1.1843108 1.2796713 1.3692762 1.4521010 1.5271118 1.5932710 1.6495450 1.6949113 1.7283663 1.7490295 1.7568367 1.7521493 1.7353726 1.7069491 1.6673551 1.6170963 1.5567052 1.4867372 1.4077677 1.3203890 1.2252074 1.1228404 1.0139134 0.8990570 0.7789042 0.6540872 0.5252349 0.3929694 0.2579035 0.1206377 -0.0182427 -0.1581701 -0.2985978 -0.4390016 -0.5788831 -0.7177709 -0.8552231 -0.9908283 -1.1242073 -1.2550137 -1.3829349 -1.5076916 -1.6290383
Cebpz -0.7058591 -0.7273201 -0.7486146 -0.7696388 -0.7902901 -0.8104669 -0.8300687 -0.8489962 -0.8671507 -0.8844345 -0.9007507 -0.9160026 -0.9300945 -0.9429304 -0.9544149 -0.9644522 -0.9729464 -0.9798012 -0.9849194 -0.9882032 -0.9895532 -0.9888689 -0.9860479 -0.9809859 -0.9735762 -0.9637093 -0.9512729 -0.9361513 -0.9182247 -0.8973695 -0.8734573 -0.8463546 -0.8159225 -0.7820159 -0.7444831 -0.7031655 -0.6578965 -0.6085013 -0.5547962 -0.4965875 -0.4336717 -0.3658335 -0.2928462 -0.2144853 -0.1308773 -0.0425259 0.0500284 0.1462220 0.2454653 0.3471403 0.4505996 0.5551643 0.6601243 0.7647373 0.8682298 0.9697980 1.0686095 1.1638053 1.2545031 1.3398003 1.4187788 1.4905090 1.5540560 1.6084850 1.6528682 1.6862922 1.7079527 1.7177890 1.7161268 1.7033302 1.6797958 1.6459490 1.6022404 1.5491426 1.4871465 1.4167584 1.3384966 1.2528883 1.1604669 1.0617689 0.9573317 0.8476904 0.7333760 0.6149128 0.4928165 0.3675922 0.2397325 0.1097162 -0.0219934 -0.1549497 -0.2887238 -0.4229056 -0.5571042 -0.6909489 -0.8240893 -0.9561958 -1.0869594 -1.2160921 -1.3433261 -1.4684140
Dmrtc1a -1.3734099 -1.3591662 -1.3438435 -1.3273789 -1.3097093 -1.2907715 -1.2705033 -1.2488437 -1.2257343 -1.2011201 -1.1749504 -1.1471803 -1.1177716 -1.0866945 -1.0539292 -1.0194667 -0.9833115 -0.9454822 -0.9060139 -0.8649595 -0.8223913 -0.7784025 -0.7331087 -0.6866489 -0.6391867 -0.5909107 -0.5420351 -0.4927995 -0.4434687 -0.3943315 -0.3456999 -0.2979063 -0.2513018 -0.2062528 -0.1631374 -0.1223414 -0.0842538 -0.0492611 -0.0177426 0.0099359 0.0334281 0.0524131 0.0666016 0.0757532 0.0799422 0.0795670 0.0750783 0.0669551 0.0556935 0.0417973 0.0257697 0.0081060 -0.0107114 -0.0302174 -0.0499669 -0.0695357 -0.0885210 -0.1065404 -0.1232295 -0.1382394 -0.1512323 -0.1618773 -0.1698445 -0.1747991 -0.1763933 -0.1742590 -0.1680357 -0.1576389 -0.1431025 -0.1244291 -0.1015917 -0.0745346 -0.0431753 -0.0074049 0.0329105 0.0779298 0.1278358 0.1828353 0.2431586 0.3090590 0.3808127 0.4587185 0.5430970 0.6342904 0.7326615 0.8385928 0.9524852 1.0747568 1.2058405 1.3461822 1.4962377 1.6564699 1.8273442 2.0093252 2.2028707 2.4084264 2.6264194 2.8572512 3.0000000 3.0000000
Hbp1 -2.2416182 -2.1775526 -2.1123486 -2.0460563 -1.9787309 -1.9104325 -1.8412263 -1.7711827 -1.7003778 -1.6288928 -1.5568150 -1.4842369 -1.4112570 -1.3379795 -1.2645143 -1.1909771 -1.1174893 -1.0441776 -0.9711747 -0.8986182 -0.8266511 -0.7554214 -0.6850817 -0.6157892 -0.5477052 -0.4809949 -0.4158267 -0.3523725 -0.2908064 -0.2313048 -0.1740457 -0.1192083 -0.0669720 -0.0175165 0.0289795 0.0723386 0.1123855 0.1489475 0.1818556 0.2109451 0.2360561 0.2570346 0.2737332 0.2860215 0.2940073 0.2980424 0.2984976 0.2957507 0.2901834 0.2821807 0.2721284 0.2604123 0.2474171 0.2335252 0.2191163 0.2045671 0.1902507 0.1765369 0.1637925 0.1523815 0.1426661 0.1350073 0.1297660 0.1273045 0.1279880 0.1321861 0.1402382 0.1521899 0.1679462 0.1874172 0.2105178 0.2371678 0.2672909 0.3008141 0.3376675 0.3777835 0.4210962 0.4675411 0.5170547 0.5695737 0.6250347 0.6833741 0.7445269 0.8084270 0.8750063 0.9441948 1.0159196 1.0901049 1.1666715 1.2455367 1.3266133 1.4098101 1.4950310 1.5821748 1.6711353 1.7618003 1.8540520 1.9477666 2.0428139 2.1390573
Sp7 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341186 -0.4341184 -0.4341177 -0.4341139 -0.4340983 -0.4340400 -0.4338478 -0.4332892 -0.4318580 -0.4286043 -0.4220076 -0.4100274 -0.3904573 -0.3615970 -0.3230614 -0.2763889 -0.2251161 -0.1741941 -0.1289158 -0.0937410 -0.0714195 -0.0626496 -0.0662753 -0.0798458 -0.1002952 -0.1245412 -0.1498917 -0.1742366 -0.1960650 -0.2143656 -0.2285667 -0.2390056 -0.2462552 -0.2507196 -0.2526686 -0.2522620 -0.2495662 -0.2445636 -0.2371570 -0.2271689 -0.2143375 -0.1983075 -0.1786183 -0.1546861 -0.1257816 -0.0910020 -0.0492352 0.0008836 0.0610248 0.1332297 0.2199881 0.3243320 0.4499461 0.6012988 0.7837936 1.0039437 1.2695686 1.5900105 1.9763680 2.4417355 3.0000000 3.0000000 3.0000000 3.0000000
Onecut2 -0.2233659 -0.2323474 -0.2411131 -0.2496660 -0.2580093 -0.2661461 -0.2740799 -0.2818138 -0.2893513 -0.2966959 -0.3038509 -0.3108198 -0.3176061 -0.3242133 -0.3306449 -0.3369044 -0.3429953 -0.3489211 -0.3546852 -0.3602910 -0.3657421 -0.3710417 -0.3761933 -0.3812002 -0.3860657 -0.3907930 -0.3953853 -0.3998458 -0.4041777 -0.4083839 -0.4124676 -0.4164316 -0.4202789 -0.4240124 -0.4276349 -0.4311491 -0.4345578 -0.4378635 -0.4410689 -0.4441764 -0.4471886 -0.4501079 -0.4529366 -0.4556763 -0.4583136 -0.4608205 -0.4631709 -0.4653405 -0.4673062 -0.4690461 -0.4705392 -0.4717642 -0.4726996 -0.4733228 -0.4736094 -0.4735329 -0.4730632 -0.4721661 -0.4708024 -0.4689258 -0.4664824 -0.4634079 -0.4596263 -0.4550464 -0.4495589 -0.4430319 -0.4353112 -0.4262524 -0.4157037 -0.4034849 -0.3893833 -0.3731491 -0.3544900 -0.3330655 -0.3084791 -0.2802709 -0.2479083 -0.2107760 -0.1681651 -0.1192614 -0.0631324 0.0012848 0.0751967 0.1599645 0.2571142 0.3683433 0.4955223 0.6406905 0.8060431 0.9939072 1.2067068 1.4469125 1.7169788 2.0192664 2.3559555 2.7289507 3.0000000 3.0000000 3.0000000 3.0000000
Nkx6-2 -0.4381157 -0.4443818 -0.4504403 -0.4562878 -0.4619224 -0.4673428 -0.4725487 -0.4775405 -0.4823192 -0.4868865 -0.4912445 -0.4953956 -0.4993428 -0.5030889 -0.5066373 -0.5099913 -0.5131543 -0.5161298 -0.5189210 -0.5215311 -0.5239634 -0.5262206 -0.5283054 -0.5302202 -0.5319669 -0.5335472 -0.5349623 -0.5362131 -0.5372998 -0.5382220 -0.5389790 -0.5395690 -0.5399899 -0.5402386 -0.5403111 -0.5402025 -0.5399067 -0.5394168 -0.5387241 -0.5378188 -0.5366894 -0.5353227 -0.5337032 -0.5318135 -0.5296370 -0.5271576 -0.5243571 -0.5212145 -0.5177061 -0.5138046 -0.5094794 -0.5046960 -0.4994154 -0.4935940 -0.4871825 -0.4801261 -0.4723628 -0.4638236 -0.4544308 -0.4440974 -0.4327262 -0.4202078 -0.4064200 -0.3912256 -0.3744711 -0.3559843 -0.3355737 -0.3130360 -0.2881520 -0.2606802 -0.2303556 -0.1968876 -0.1599595 -0.1192262 -0.0743141 -0.0248199 0.0296894 0.0896758 0.1556299 0.2280682 0.3075304 0.3945753 0.4897758 0.5937118 0.7069629 0.8300987 0.9636694 1.1081939 1.2641489 1.4319566 1.6119735 1.8044794 2.0096683 2.2276403 2.4583967 2.7018369 2.9577581 3.0000000 3.0000000 3.0000000
write.table(heatmap_matrix_q_value_0.01, file = file.path(tables_directory, "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21-significant_transcription_factors_diff_test_analysis_qval_0.01_heatmap_matrix.txt"), sep="\t", quote=FALSE, row.names=FALSE)
2.2.2.1.4 Ordered pseudotime heatmap (Sam’s function)
ordered_matrix <- ordered_pseudotime_heatmap(monocle[significant_transcription_factors_q_value_0.01,], show_rownames=FALSE, return_matrix = FALSE)

ordered_matrix <- ordered_pseudotime_heatmap(monocle[significant_transcription_factors_q_value_0.01,], show_rownames=FALSE, return_matrix = FALSE)

ordered_matrix <- ordered_pseudotime_heatmap(monocle[significant_transcription_factors_q_value_0.01,], show_rownames=TRUE, return_matrix = TRUE)

ordered_matrix <- as.data.frame(ordered_matrix) %>% rownames_to_column("gene")
ordered_matrix <- left_join(select(transcription_factors_table_q_value_0.01, gene, pval, qval, num_cells_expressed), ordered_matrix)
write.table(ordered_matrix, file = file.path(tables_directory, "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21_differential_gene_test_analysis_qval_0.01_sam_ordered_heatmap_matrix.txt"), sep="\t", quote=FALSE, row.names=FALSE)
2.2.2.1.5 Plotting of transcription factors differentially expressed in pseudotime
2.2.2.1.5.1 Top 10 differentially expressed genes (q value < 5*10^-5)
transcription_factors_table_q_value_5_10_minus_5_ordered_qval <- arrange(transcription_factors_table_q_value_5_10_minus_5, qval)
marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[1]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[2]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[3]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[4]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[5]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[6]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[7]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[8]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[9]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

marker <- transcription_factors_table_q_value_5_10_minus_5_ordered_qval$gene[10]
p1 <- plot_cell_trajectory(monocle, markers=marker)
p2 <- plot_cell_trajectory(monocle, use_color_gradient = TRUE, markers=marker)
show(p1+p2)

2.3 Selected genes

# Genes of interest.
genes_of_interest <- c("Aqp4", "Fabp7", "Kif9", "Mbp", "Nes", "Pdgfra", "Top2a")

# Remove genes of interest not present in Seurat dataset
genes_not_present <- genes_of_interest[!genes_of_interest %in% rownames(seurat@data)]
genes_of_interest <- genes_of_interest[!genes_of_interest %in% genes_not_present]
if(length(genes_not_present != 0)) {
  print(paste0("The following genes were not present in the Seurat object", genes_not_present))
}
      
diff_test_res <- differentialGeneTest(monocle[genes_of_interest],
      fullModelFormulaStr = "~sm.ns(Pseudotime)")
sig_gene_names <- row.names(subset(diff_test_res, qval < 0.1))
plot_pseudotime_heatmap(monocle[genes_of_interest,],
      num_clusters = 1,
      cores = 1,
      show_rownames = T)

2.3.1 Genes in pseudotime, single branch (Selected genes)

p <- plot_genes_in_pseudotime(monocle[genes_of_interest,], color_by="cluster") + scale_color_manual(values=colours)
p <- p %>% remove_geom("point")
p <- p %>% remove_geom("Line")
p <- p %>% + geom_line(aes(x = Pseudotime, y = expectation), size=1)
show(p)

2.3.2 Genes in pseudotime with branches (Selected genes)

p <- plot_genes_branched_pseudotime(monocle[genes_of_interest,], color_by="cluster") + scale_color_manual(values=colours)
show(p)

p <- p %>% remove_geom("point")
show(p)

3 Seurat tSNE plots

p <- cytokit::tsne(seurat, label=FALSE)
show(p)

p <- tsne_plot_clusters_highlighted(seurat, selected_clusters, legend=TRUE)
show(p)

p <- p + theme(legend.position = "none")
show(p)

p <- tsne_plot_clusters_highlighted_with_pseudotime(seurat, monocle, selected_clusters, legend=TRUE)
show(p)

p <- p + theme(legend.position = "none")
show(p)

4 Save monocle object to directory, and write pseudotime of cells to table.

save(monocle, file=file.path(monocle_objects_directory, "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21.Rda"))
cells_pseudotime <- pData(monocle) %>% select(cell, Pseudotime) %>% rename(pseudotime=Pseudotime)
write.table(cells_pseudotime, file.path(tables_directory, "1-hindbrain_oligodendrocytes_joint_pons_clusters_14_4_8_21_cell_pseudotime.txt"), sep="\t", quote=FALSE, row.names=FALSE)

5 Session info

sessionInfo()
## R version 3.5.0 (2018-04-23)
## Platform: x86_64-redhat-linux-gnu (64-bit)
## Running under: CentOS Linux 7 (Core)
## 
## Matrix products: default
## BLAS/LAPACK: /var/chroots/hydraex-centos-7/usr/lib64/R/lib/libRblas.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
##  [1] splines   stats4    parallel  stats     graphics  grDevices utils    
##  [8] datasets  methods   base     
## 
## other attached packages:
##  [1] viridis_0.5.1       viridisLite_0.3.0   forcats_0.4.0      
##  [4] stringr_1.4.0       dplyr_0.8.0.1       purrr_0.3.0        
##  [7] tidyr_0.8.2         tibble_2.0.1        tidyverse_1.2.1    
## [10] Seurat_2.3.4        cowplot_0.9.4       R.utils_2.8.0      
## [13] R.oo_1.22.0         R.methodsS3_1.7.1   readr_1.3.1        
## [16] readxl_1.3.0        patchwork_0.0.1     monocle_2.10.1     
## [19] DDRTree_0.1.5       irlba_2.3.3         VGAM_1.1-1         
## [22] Biobase_2.42.0      BiocGenerics_0.28.0 Matrix_1.2-15      
## [25] ggedit_0.3.0        ggplot2_3.1.0       kableExtra_1.0.1   
## [28] cytokit_0.6.0       pheatmap_1.0.12     colorRamps_2.3     
## 
## loaded via a namespace (and not attached):
##   [1] snow_0.4-3           backports_1.1.3      Hmisc_4.2-0         
##   [4] plyr_1.8.4           igraph_1.2.4         lazyeval_0.2.2      
##   [7] densityClust_0.3     fastICA_1.2-1        digest_0.6.18       
##  [10] foreach_1.4.4        htmltools_0.3.6      lars_1.2            
##  [13] gdata_2.18.0         magrittr_1.5         checkmate_1.9.1     
##  [16] cluster_2.0.7-1      mixtools_1.1.0       ROCR_1.0-7          
##  [19] limma_3.38.3         modelr_0.1.3         matrixStats_0.54.0  
##  [22] docopt_0.6.1         colorspace_1.4-0     ggrepel_0.8.0       
##  [25] rvest_0.3.2          haven_2.0.0          xfun_0.4            
##  [28] sparsesvd_0.1-4      crayon_1.3.4         jsonlite_1.6        
##  [31] survival_2.43-3      zoo_1.8-4            iterators_1.0.10    
##  [34] ape_5.2              glue_1.3.0           gtable_0.2.0        
##  [37] webshot_0.5.1        kernlab_0.9-27       prabclus_2.2-7      
##  [40] DEoptimR_1.0-8       scales_1.0.0         mvtnorm_1.0-8       
##  [43] bibtex_0.4.2         miniUI_0.1.1.1       Rcpp_1.0.0          
##  [46] metap_1.1            dtw_1.20-1           xtable_1.8-3        
##  [49] htmlTable_1.13.1     reticulate_1.11.1    foreign_0.8-71      
##  [52] bit_1.1-14           proxy_0.4-22         mclust_5.4.2        
##  [55] SDMTools_1.1-221     Formula_1.2-3        tsne_0.1-3          
##  [58] htmlwidgets_1.3      httr_1.4.0           FNN_1.1.3           
##  [61] gplots_3.0.1.1       RColorBrewer_1.1-2   shinyAce_0.3.3      
##  [64] fpc_2.1-11.1         acepack_1.4.1        modeltools_0.2-22   
##  [67] ica_1.0-2            pkgconfig_2.0.2      flexmix_2.3-14      
##  [70] nnet_7.3-12          labeling_0.3         tidyselect_0.2.5    
##  [73] rlang_0.3.1          reshape2_1.4.3       later_0.8.0         
##  [76] cellranger_1.1.0     munsell_0.5.0        tools_3.5.0         
##  [79] cli_1.0.1            generics_0.0.2       broom_0.5.1         
##  [82] ggridges_0.5.1       evaluate_0.13        shinyBS_0.61        
##  [85] yaml_2.2.0           npsurv_0.4-0         knitr_1.21          
##  [88] bit64_0.9-7          fitdistrplus_1.0-14  robustbase_0.93-3   
##  [91] caTools_1.17.1.1     randomForest_4.6-14  RANN_2.6.1          
##  [94] pbapply_1.4-0        nlme_3.1-137         mime_0.6            
##  [97] slam_0.1-44          xml2_1.2.0           hdf5r_1.0.0         
## [100] compiler_3.5.0       rstudioapi_0.9.0     png_0.1-7           
## [103] lsei_1.2-0           stringi_1.3.1        highr_0.7           
## [106] lattice_0.20-35      trimcluster_0.1-2.1  HSMMSingleCell_1.2.0
## [109] pillar_1.3.1         combinat_0.0-8       Rdpack_0.10-1       
## [112] lmtest_0.9-36        data.table_1.12.0    bitops_1.0-6        
## [115] gbRd_0.4-11          httpuv_1.5.1         R6_2.4.0            
## [118] latticeExtra_0.6-28  promises_1.0.1       KernSmooth_2.23-15  
## [121] gridExtra_2.3        codetools_0.2-15     MASS_7.3-51.1       
## [124] gtools_3.8.1         assertthat_0.2.0     withr_2.1.2         
## [127] qlcMatrix_0.9.7      diptest_0.75-7       doSNOW_1.0.16       
## [130] hms_0.4.2            grid_3.5.0           rpart_4.1-13        
## [133] class_7.3-14         rmarkdown_1.11       segmented_0.5-3.0   
## [136] Rtsne_0.15           lubridate_1.7.4      shiny_1.2.0         
## [139] base64enc_0.1-3